package common.fengkai.filepost.VO;

import lombok.Data;

@Data
public class ResVo {
    private  String msg;
    private byte[] file;
    private String code;

    public ResVo (String msg, byte[] file, String code) {
        this.msg = msg;
        this.file = file;
        this.code = code;
    }

    public ResVo (String msg, String code) {
        this.msg = msg;
        this.code = code;
    }

    public ResVo () {
    }

    /**
     * 成功返回信息
     * @param file
     * @return
     */
    public static ResVo ok(byte[] file){
       return    new   ResVo("签章成功",file,"10000");
    }

    /**
     * 成功返回信息
     * @param
     * @return
     */
    public static ResVo failed(String msg){
        return    new   ResVo("签章失败："+msg,"10001");
    }

    /**
     * 成功返回信息
     * @param
     * @return
     */
    public static ResVo ok(String msg){
        return    new   ResVo("用户："+msg,"10000");
    }

}
